package edu.towson.android.graphgrammar;

import edu.towson.android.graphgrammar.activity.ActivityException;

public class CommandMain {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		if (!validateArgs(args)) {
			return;
		}
		GeneratorInputProperties prop = convertFromArgs(args);
		Generator generator = new Generator(prop);
		try {
			generator.process();
		} catch (ActivityException ae) {
			System.out.println("Error occurred during processing activities:"
					+ ae.getMessage());
		} catch (GraphGrammarProcessException ggpe) {
			System.out.println("Error occurred during processing:"
					+ ggpe.getMessage());
		}
	}

	private static boolean validateArgs(String[] args) {
		// TODO
		return true;
	}

	private static GeneratorInputProperties convertFromArgs(String[] args) {
		GeneratorInputProperties properties = new GeneratorInputProperties();
		return properties;
	}
}
